package com.hopes.bizz.risk.gis.constant;

import com.hopes.bizz.risk.common.constant.enums.RiskSysDictEnum;
import com.hopes.bizz.risk.hid.entity.RiskHidHiddenDangerEntity;

import java.util.function.Function;

/**
 * @author lyb
 * @version 1.0
 * @description: 隐患统计类型
 * @date 2024/2/23 14:01
 */
public enum RiskHidCountStatisticsTypeEnum {

    hid_source(RiskHidHiddenDangerEntity::getHidSource,RiskSysDictEnum.hidden_danger_check_type_and_source),

    hid_level(RiskHidHiddenDangerEntity::getHidSource,RiskSysDictEnum.danger_level),

    hid_status(RiskHidHiddenDangerEntity::getHidSource,RiskSysDictEnum.hidden_danger_status)
    ;
    private final Function<RiskHidHiddenDangerEntity,Integer> function;

    private final RiskSysDictEnum dictEnum;

    RiskHidCountStatisticsTypeEnum(Function<RiskHidHiddenDangerEntity,Integer> function, RiskSysDictEnum dictEnum) {
        this.function = function;
        this.dictEnum = dictEnum;
    }

    public Function<RiskHidHiddenDangerEntity, Integer> getFunction() {
        return function;
    }

    public RiskSysDictEnum getDictEnum() {
        return dictEnum;
    }
}
